<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <link href="images/favicon.ico" mce_href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <title>余额</title>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/weui.css"/>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/wechat.css"/>
    </head>
    <body ontouchstart>
        <div class="container js_container">

        </div>
         <div class="page pad-20">
             <div class="bd">
             	<c:forEach var="bean" items="${list }">
	                <div class="gas-card-container gas-bg-1" onclick="show_detail(this,'${bean.memberId}','${bean.HQId}')">
	                    <div class="gas-card">
	                    	<input type="hidden" id="hqName" value="${bean.HQName }"/>
	                        <p class="gas-station-name">${bean.HQName }</p>
	                        <h1 class="text-center pad-20">
	                        	<c:if test="${bean.memberType == 1 }">企业子帐号</c:if>
	                        	<c:if test="${bean.memberType == 2 }">企业总账号</c:if>
	                        </h1>
	                        <div class="gas-card-detail">
	                            <div>
	                                <p>余额：<b>${bean.amount }</b></p>
	                            </div>
	                            <div>
	                                <p>积分：<b>${bean.point}</b></p>
	                            </div>
	                        </div>
	                    </div>
	                </div>
				</c:forEach>
             </div>
         </div>
         <div class="footer">
             <span>本服务由</span>
             <img src="${pageContext.request.contextPath}/images/logo.png" title="油掌柜" />
             <span>提供技术支持</span>
         </div>
         <form id="show_detail_form" action="${pageContext.request.contextPath}/member/toDetail" method="post">
         	<input type="hidden" name="memberId" id="memberId" />
         	<input type="hidden" name="hqId" id="hqId"  />
         	<input type="hidden" name="hqName" id="hqName"/>
         </form>
    </body>
     <script src="${pageContext.request.contextPath}/js/zepto.min.js"></script>
     <script src="${pageContext.request.contextPath}/js/wechat.js"></script>
     <script type="text/javascript">
    	function show_detail(doc,memberId,hqId){
    		$("#show_detail_form").find("#memberId").val(memberId);
    		$("#show_detail_form").find("#hqId").val(hqId);
    		$("#show_detail_form").find("#hqName").val($(doc).find("#hqName").val());
    		$("#show_detail_form").submit();
    	}
    </script>
</html>